import { FC, useContext } from "react";
import { Image } from "antd";
import { AppContext } from "@/providers";
interface ImgTextOptionProps {
	url?: string | null;
	name: string;
}
const ImgTextOption: FC<ImgTextOptionProps> = ({ url, name }) => {
	const { REACT_APP_BASEURL } = useContext(AppContext);
	return (
		<div className="flex">
			{url && <Image height={25} width={30} style={{ objectFit: "cover" }} src={`${REACT_APP_BASEURL}${url}`} />}
			<div className="ml-2">{name}</div>
		</div>
	);
};

export default ImgTextOption;
